-- GENERATED SPELL FOR [Prince Valanar] --


function spell0_25601(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25601', 3000, 1)
end

function spell1_25601(pUnit, Event) --@Soul Blast,n/a--
pUnit:FullCastSpellOnTarget(50992,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25601', 651, 1)
end

function spell2_25601(pUnit, Event) --@Soul Deflection,n/a--
pUnit:FullCastSpellOnTarget(51009,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25601', 6300, 1)
end

function Sorts_25601(pUnit, Event)
local choix_sorts_25601 = math.random(0, 2)
if choix_sorts_25601 == 0 then
pUnit:RegisterEvent('spell0_25601', 1, 1)
end
if choix_sorts_25601 == 1 then
pUnit:RegisterEvent('spell1_25601', 1, 1)
end
if choix_sorts_25601 == 2 then
pUnit:RegisterEvent('spell2_25601', 1, 1)
end
end

function mob25601_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25601', math.random(1500, 3000), 1)
end

function mob25601_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25601_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25601_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25601, 1, 'mob25601_Action')
RegisterUnitEvent(25601, 2, 'mob25601_Leave')
RegisterUnitEvent(25601, 3, 'mob25601_Kill')
RegisterUnitEvent(25601, 4, 'mob25601_Die')
